﻿@page "/StepLines/Basic"
@using LiveChartsCore.SkiaSharpView.Blazor
@using LiveChartsCore.SkiaSharpView
@using LiveChartsCore
@using LiveChartsCore.SkiaSharpView.Painting
@using LiveChartsCore.SkiaSharpView.VisualElements
@using LiveChartsCore.SkiaSharpView.Drawing.Geometries
@using SkiaSharp

<CartesianChart
	Series="Series"
    Title="Title">
</CartesianChart>

@code {
    private ISeries[] Series { get; set; }
    private DrawnLabelVisual Title { get; set; }

    protected override void OnInitialized()
    {
        var values = new double[] { 2, 1, 3, 4, 3, 4, 6 };

        Series = new ISeries[]
        {
            new StepLineSeries<double>
            {
                Values = values,
                Fill = null,
                GeometrySize = 20
            }
        };

        Title = new DrawnLabelVisual(
            new LabelGeometry
            {
                Text = "My chart title",
                Paint = new SolidColorPaint(SKColor.Parse("#303030")),
                TextSize = 25,
                Padding = new LiveChartsCore.Drawing.Padding(15)
            });
    }
}
